import tkinter as tk

import time
import datetime
import DateUtils


def submit_form():
    name = name_entry.get()
    age = age_entry.get()
    email = email_entry.get()

    print("Name:", name)
    print("Age:", age)
    print("Email:", email)

if __name__ == '__main__':
    now = DateUtils.getDate()
    timestamp = time.time()

    print("当前时间戳:", timestamp)
    window = tk.Tk()

    # 创建姓名标签和输入框
    name_label = tk.Label(window, text="Name:")
    name_label.grid(row=0, column=0)
    name_entry = tk.Entry(window)
    name_entry.grid(row=0, column=1)

    # 创建年龄标签和输入框
    age_label = tk.Label(window, text="Age:")
    age_label.grid(row=1, column=0)
    age_entry = tk.Entry(window)
    age_entry.grid(row=1, column=1)

    # 创建邮箱标签和输入框
    email_label = tk.Label(window, text="Email:")
    email_label.grid(row=2, column=0)
    email_entry = tk.Entry(window)
    email_entry.grid(row=2, column=1)

    # 创建提交按钮
    submit_button = tk.Button(window, text="Submit", command=submit_form)
    submit_button.grid(row=3, columnspan=2)

    window.mainloop()

    # 创建提交按钮
    submit_button = tk.Button(window, text="Submit", command=submit_form)
    submit_button.pack()

    window.mainloop()